package com.kws.merchant.service.impl;


import com.kws.merchant.domain.ContractReplenish;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.kws.merchant.mapper.ContractReplenishMapper;
import com.kws.merchant.service.ContractReplenishService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;

/**
 * 合同管理-合同补充(ContractReplenish)表服务实现类
 *
 * @author yxy
 * @since 2024-10-30 20:25:05
 */
@Service("contractReplenishService")
public class ContractReplenishServiceImpl extends ServiceImpl<ContractReplenishMapper, ContractReplenish> implements ContractReplenishService {

    @Resource
    private ContractReplenishMapper contractReplenishMapper;


    /**
     * 分页查询列表
     */
    @Override
    public Page<ContractReplenish> pageList(ContractReplenish contractReplenish) {
        Page<ContractReplenish> page = new Page<>(0, 10);
        LambdaQueryWrapper<ContractReplenish> queryWrapper = Wrappers.lambdaQuery();

        return this.page(page, queryWrapper);
    }

    /**
     * 查询补充协议
     * @param replenishNo
     * @return
     */
    @Override
    public ContractReplenish getReplenishNo(String replenishNo) {
        return this.getOne(Wrappers.<ContractReplenish>lambdaQuery().eq(ContractReplenish::getReplenishNo,replenishNo));
    }


}
